package com.example.model;

import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.ArrayList;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class TableInfo {
    private String name;
    private String comment;
    private List<ColumnInfo> columns;
    private List<String> primaryKeys = new ArrayList<>();
    private List<ForeignKeyInfo> foreignKeys = new ArrayList<>();
    
    // 兼容旧构造函数
    public TableInfo(String name, String comment, List<ColumnInfo> columns) {
        this.name = name;
        this.comment = comment;
        this.columns = columns;
        this.primaryKeys = new ArrayList<>();
        this.foreignKeys = new ArrayList<>();
    }
}

